<h1>Referrers statistic for <%= @subdomain %> </h1>
<%=render(:partial=>'menu')%>
<h2>Repeat referrers</h2>
<div id="path_stats_refsd">
  <table class="list">
    <tr>
      <th>Domains</th>
      <th>Referred to Resource</th>
      <th>Hits</th>
    </tr>
    <% for row in @refs %>
    <tr class="<%= alternator %>">
      <td><a href='<%= row['referer'] %>' title='<%= row['resource'] %>'><%=row['domain']%></a></td>
      <td><%= row['resource'] %></td>
      <td><%= row['total'] %></td>
    </tr>
    <% end %>
  </table>
</div>

<h2>Search strings</h2>
<div id="path_stats_refst">
  <table class="list">
    <tr>
      <th>Search strings</th>
      <th>Hits</th>
    </tr>
<% for row in @searchterms %>
    <tr class="<%= alternator %>">
      <td><%=h row['searchterms'] %></td>
      <td><%= row['count'] %></td>
    </tr>
<% end %>
  </table>
</div>
</div>
</div>
